package com.bawei.mvvm

import com.google.gson.Gson
import okhttp3.MediaType
import okhttp3.RequestBody

//项目中所有的扩展函数

fun <T1,T2> MutableMap<T1,T2>.toBody():RequestBody{
    var  str = Gson().toJson(this)
    var requestBody =RequestBody.create(MediaType.parse("application/json;charset=utf-8"),str)
    return requestBody
}
